[SNOW-3249917] JDBC removal Step 10c: Remove SFSession from storage stack#1135
Merged
sfc-gh-ggeng merged 1 commit intomasterfrom Apr 6, 2026
Merged
Conversation
553fdbb to
dbce69a
Compare
b5ccf78 to
72f5e83
Compare
dbce69a to
a78295d
Compare
72f5e83 to
0cd4046
Compare
…tack
Remove SFSession/SFBaseSession parameters and dead session-based code
from the storage client stack. Session was always null from ingest callers.
Storage clients (SnowflakeS3Client, SnowflakeAzureClient, SnowflakeGCSClient):
- Remove SFSession/SFBaseSession fields and constructor params
- Remove dead `if (session != null)` proxy/headers/permissions blocks
(keep sessionless path)
- Remove dead `if (session != null) { renewExpiredToken(...) }` blocks
- Simplify getMaxRetries() to return default (no session property lookup)
- Replace session.isOwnerOnlyStageFilePermissionsEnabled() with false
Interface + strategies:
- SnowflakeStorageClient: remove SFSession from all method signatures
- GCSAccessStrategy/GCSAccessStrategyAwsSdk/GCSDefaultAccessStrategy:
remove SFSession from constructors and handleStorageException
- StorageClientFactory: remove SFSession/SFBaseSession params
Agent + config:
- SnowflakeFileTransferAgent: remove session from getStageInfo(),
pushFileToRemoteStore(), compressStreamWithGZIP/NoDigest().
Remove dead renewExpiredToken(), parseCommandInGS(),
getLocalFilePathFromCommand() methods.
- SnowflakeFileTransferConfig: remove SFSession field, getter, setter
Remaining SFSession imports (3): SnowflakeSQLLoggedException (constructor
params), TelemetryClient (session-based code) — to be handled next.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a78295d to
8637890
Compare
sfc-gh-alhuang
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove SFSession/SFBaseSession parameters and dead session-based code from the storage client stack. Session was always null from ingest callers — all code behind
if (session != null)guards was dead code.14 files changed, +267/-590 lines (net -323 lines of dead code removed)
Storage clients
SFSession/SFBaseSessionfields and constructor paramsif (session != null)proxy/headers/permissions blocks (keep sessionless path)renewExpiredToken()callsgetMaxRetries()to return default 25 (no session property lookup)session.isOwnerOnlyStageFilePermissionsEnabled()withfalseInterface + strategies
SnowflakeStorageClient: remove SFSession from all method signaturesGCSAccessStrategy/GCSAccessStrategyAwsSdk/GCSDefaultAccessStrategy: remove SFSessionStorageClientFactory: remove SFSession/SFBaseSession paramsAgent + config
SnowflakeFileTransferAgent: remove session fromgetStageInfo(),pushFileToRemoteStore(), compress methods. Remove deadrenewExpiredToken(),parseCommandInGS(),getLocalFilePathFromCommand().SnowflakeFileTransferConfig: remove SFSession field/getter/setterImport cleanup
SnowflakeSQLException,SnowflakeSQLLoggedException,TelemetryEvent: remove now-unusedSFBaseSession/SFSessionimportsRemaining (next PR — #1136)
2 SFSession imports remain:
SnowflakeSQLLoggedException(constructor params),TelemetryClient(session-based code). Handled in Step 10c2.Test plan
mvn compiler:compilepasses🤖 Generated with Claude Code